package com.sunnyatwal.kettlebell.model;

public class WorkoutBuilder {
	
	public static Exercise generateWorkout(String name, int rounds, int workTime, int restTime) {
		
		Exercise exercise = new Exercise(name);
		
		Work work = new Work(workTime);
		Rest rest = new Rest(restTime);
		
		for(int i = 0; i < rounds; i++) {
			exercise.AddRoutineItem(work);
			exercise.AddRoutineItem(rest);
		}
				
		return exercise;		
	}
}
